using Microsoft.AspNetCore.Builder;

namespace Eno.Infrastructure.Middleware;

// 中间件
public static class MiddlewareExtensions
{
    public static IApplicationBuilder UseRequestLogging(this IApplicationBuilder builder)
    {
        // ! RequestLoggingMiddleware 的主要作用是记录进入应用程序的 HTTP 请求信息
        return builder.UseMiddleware<RequestLoggingMiddleware>();
    }
} 